package com.lancoo.klgcourseware.api;


import com.lancoo.klgcourseware.entity.ESPCardSource;
import com.lancoo.klgcourseware.entity.EnglishCardSource;
import com.lancoo.klgcourseware.entity.EnglishCardUsageTrain;
import com.lancoo.klgcourseware.entity.KlgApiResponse;
import com.lancoo.klgcourseware.entity.ObsConfigMsgBean;
import com.lancoo.klgcourseware.entity.ResourcePlatFormConfigure;
import com.lancoo.klgcourseware.entity.WordArticulation;
import com.lancoo.klgcourseware.entity.WordCodeResponce;
import com.lancoo.klgcourseware.entity.bean.KlgConstant;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by pengmi on 2018/11/7.
 * Description:
 */

public interface KlgEnglishApi {


    @GET("DebrisPublicWeb.asmx/WS_Get_ESP_MaterialByCode")
    Observable<KlgApiResponse<ESPCardSource>> getESPMaterialCardByCode(@Query(KlgConstant.API_KLGCODE) String klgCode);

    @GET("DebrisPublicWeb.asmx/WS_Get_EnglishCardByCode")
    Observable<KlgApiResponse<EnglishCardSource>> getEnglishOldCardByCode(@Query(KlgConstant.API_KLGCODE) String klgCode);

    @GET("DebrisPublicWeb.asmx/WS_Get_EnglishNewCardByCode")
    Observable<KlgApiResponse<EnglishCardSource>> getEnglishCardByCode(@Query(KlgConstant.API_KLGCODE) String klgCode);

    @GET("DebrisPublicWeb.asmx/WS_Get_Config")
    Observable<KlgApiResponse<ResourcePlatFormConfigure>> getPlatFormConfigure();

    @GET("DebrisPublicWeb.asmx/WS_Get_WordSoundTrainByCode")
    Observable<KlgApiResponse<WordArticulation>> getWordSoundTrain(@Query(KlgConstant.API_KLGCODE) String klgCode);

    //根据知识点编码获取英语知识点卡片练习详情
    @GET("DebrisPublicWeb.asmx/WS_Get_EnglishPracticeByCode")
    Observable<KlgApiResponse<EnglishCardUsageTrain>> getEnglishPractice(@Query(KlgConstant.API_KLGCODE) String klgCode);



    @GET("{url}")
    Observable<Object> getExpandTxtDetails(@Path("url") String url);

    @GET("api/config/getversion")
    Observable<String> getKlgVersion();


    @GET("api/config/getobsconfig?platform=1")
    Observable<ObsConfigMsgBean> getObsConfig();

    @GET("api/DecryptResources/GetWordCode")
    Observable<WordCodeResponce> getWordCode(
            @Query("knowledge") String knowledge
    );

}
